import React from 'react';
import ReactDOM from 'react-dom';
import {Provider} from 'mobx-react'
import {
    BrowserRouter,
    Route
} from 'react-router-dom';

import CarOrder from './CarOrder.jsx';
import PaySuccess from '../PaySuccess.jsx';
import PayFail from '../PayFail.jsx';

import carOrderStore from './CarOrderStore';


const stores = {carOrderStore};
const RouterList = () => (
    <Provider {...stores}>
        <BrowserRouter>
            <div>
                <Route path="/pages/mobile/car/scan/lane/index.html" component={CarOrder}/>
                <Route path="/payAuth/jhcloud/paySuccess" component={PaySuccess}/>
                <Route path="/payAuth/jhcloud/payFail" component={PayFail}/>
            </div>
        </BrowserRouter>
    </Provider>
);

ReactDOM.render(
    (<RouterList/>),
    document.getElementById('root')
);